<?php

namespace app\models\abdominal;

use Yii;

/**
 * This is the model class for table "abdominal_breathing".
 *
 * @property int $id
 * @property string $code 唯一标志
 * @property string $name 名称
 * @property string $tag 标签
 * @property string $frequency 频率
 * @property int $actions 动作组
 * @property int $inhalation 吸气时间
 * @property int $exhalation 呼气时间
 * @property int $train_time 方案时长
 * @property string $gmt_create
 * @property string $gmt_modify
 */
class AbdominalBreathing extends \yii\db\ActiveRecord
{


    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'abdominal_breathing';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['frequency'], 'default', 'value' => ''],
            [['train_time'], 'default', 'value' => 0],
            [['actions', 'inhalation', 'exhalation', 'train_time'], 'integer'],
            [['gmt_create', 'gmt_modify'], 'safe'],
            [['code'], 'string', 'max' => 8],
            [['name', 'tag', 'frequency'], 'string', 'max' => 32],
            [['code'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'name' => 'Name',
            'tag' => 'Tag',
            'frequency' => 'Frequency',
            'actions' => 'Actions',
            'inhalation' => 'Inhalation',
            'exhalation' => 'Exhalation',
            'train_time' => 'Train Time',
            'gmt_create' => 'Gmt Create',
            'gmt_modify' => 'Gmt Modify',
        ];
    }

}
